package org.example.netty.test.nio.bean;

import io.netty.util.Recycler;
import lombok.Data;

/**
 * @author zp
 * @version 1.0
 * @description: 自定义的池化 存放的对象
 * @date 2023/3/23 19:44
 */
@Data
public class RecyclerUser {

    private String name;
    private Recycler.Handle<RecyclerUser> handle;

    public RecyclerUser(Recycler.Handle<RecyclerUser> handle) {
        this.handle = handle;
    }

    public void recycle() {
        handle.recycle(this);
    }

}
